package com.vip.common.exception;

import com.vip.common.enums.ResponseEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 自定义异常
 * @author tianlianyin
 * @Date 2024/11/9
 */
@Data
@EqualsAndHashCode(callSuper = true)// 不重写hashCode
public class BaseException extends RuntimeException{
    private ResponseEnum responseCodeEnum;
    public BaseException(ResponseEnum responseCodeEnum, String message) {
        super(message);
        setResponseCodeEnum(responseCodeEnum);
    }
}
